home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-hohenheim.de!news
- From: roberto canales <rcanales@sag.es>
- Newsgroups: comp.lang.c++
- Subject: Re: bitmaps with visual c++ help!
- Date: Wed, 20 Mar 1996 16:00:38 -0800
- Organization: Rechenzentrum Universitaet Hohenheim
- Message-ID: <31509C26.230C@sag.es>
- References: <4in47t$pmn@korfu.igd.fhg.de>
- NNTP-Posting-Host: 193.127.46.178
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Nader El-Azabi (Jian Zhang) wrote:
- >
- > Hi everybody,
- > I'm new to this visual c++ windows stuff. I hope you can
- > help me with this: I created an app wizzard application
- > with form view option. I got a row of buttons and wish
- > to display a bitmap I created with corel draw, on the
- > main window when pushing a button.
- > Is it possible to place a bitmap (gif file, bmp file) so it is visible
- > first the application is being executed ?
- > thanks,
- You can display bitmap using CBitmapButton class.
- You must paint a button with AppStudio with "Owner Draw" style.
- You must paint 4 bitmaps with the name of the caption and suffix U,D,F,X
- See CBitmapButton overview
-
- Exemple:
-
- if the caption is BOTON
- the bitmap must be "BOTONU","BOTOND","BOTONX","BOTONF"
-
- In the prototipe of the class declare a CBitmapButton object
- and in OnInitialUpdate of your view use AutoLoad
-
-
-
-
- class CBaseView : public CFormView
- {
- --------
- CBitmapButton ante;
- CBitmapButton sig;
-
- virtual void OnInitialUpdate();
- .......
- };
-
-
-
- void CBaseView::OnInitialUpdate()
- {
- ante.AutoLoad(IDC_ANTERIOR,this);
- sig.AutoLoad(IDC_SIGUIENTE,this);
- UpdateData(FALSE);
- }
-
- You can see c:\msvc\mfc\sample\speakn exemple
-
- If you want display a bitmap of disk see
- c:\msvc\mfc\sample\diblook exemple
-
- Excuse my english.
-
- Roberto Canales
- rcanales@sag.es
-